#include "stdafx.h"
#include "net/TCPServerConnection.hpp"

NET_NAMESPACE_BEGIN

//
// CTCPServerConnection
//
CTCPServerConnection::CTCPServerConnection(const CStreamSocket& socket) : m_socket(socket)
{
}

CTCPServerConnection::~CTCPServerConnection()
{
}

CStreamSocket& CTCPServerConnection::socket()
{
	return m_socket;
}

void CTCPServerConnection::start()
{
	try
	{
		run();
	}
	catch (CException& exc)
	{
		CErrorHandler::handle(exc);
	}
	catch (std::exception& exc)
	{
		CErrorHandler::handle(exc);
	}
	catch (...)
	{
		CErrorHandler::handle();
	}
}


//
// CTCPServerConnectionFactory
//
CTCPServerConnectionFactory::CTCPServerConnectionFactory()
{
}

CTCPServerConnectionFactory::~CTCPServerConnectionFactory()
{
}

NET_NAMESPACE_END
